/**
 * @file         srt_common_def.h
 * @brief        属性通用类型定义
 * @note    
 * @author       MasterLiu(zhanlin.liu@hopechart.com,刘沾林)
 *
 * @par          修改日志
 * <table>
 * <tr><th>Date        <th>Version               <th>Author                                    <th>Description
 * <tr><td>2022-04-26  <td>1.0                   <td>MasterLiu(zhanlin.liu@hopechart.com,刘沾林)   <td>创建初始版本
 * <tr><td>2022-12-07  <td>1.1                   <td>Akee(shengkun.you@hopechart.com,尤胜坤)   <td>从srt_def.h文件中移到srt_common_def.h变成公共文件
 * @copyright    杭州鸿泉物联网技术股份有限公司
 */
#ifndef _SRT_COMMON_DEF_H_
#define _SRT_COMMON_DEF_H_

#include "ofc/ofc_types.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
 * SrtKey的类型定义
 */
enum TSrtKeyTypeTag 
{
    kSrtKeyTypeBool     = 0,
    kSrtKeyTypeU8       = 1,
    kSrtKeyTypeU16      = 2,
    kSrtKeyTypeU32      = 3,
    kSrtKeyTypeU64      = 4,
    kSrtKeyTypeBin      = 5,
    kSrtKeyTypeMax      = kSrtKeyTypeBin + 1,
    kSrtKeyTypeFree = 8,
} ;
typedef enum TSrtKeyTypeTag TSrtKeyType;

/**
 * Srt扩展块，项的枚举
 */
enum TSrtExtItemEnumTag 
{
    kSrtExtItemTimeStamp     = 0,
    kSrtExtItemMax,
} ;
typedef enum TSrtExtItemEnumTag TSrtExtItemEnum;

/**
 * SrtKey的32BitID定义
 */
typedef struct TSrtKeyIdDescTag TSrtKeyIdDesc;
struct TSrtKeyIdDescTag 
{
    UInt32 b_id: 14;        ///< id
    UInt32 b_priv: 2;       ///< 权限
    UInt32 b_group: 5;      ///< 组ID
    UInt32 b_notify: 1;     ///< 变化通知
    UInt32 b_type: 3;       ///< 类型
    UInt32 b_restore: 2;    ///< 恢复出厂级别
    UInt32 b_sync: 1;       ///< 是否同步
    UInt32 b_persist: 1;    ///< 是否存储
    UInt32 b_log: 1;        ///< 是否记录日志
    UInt32 b_private: 1;    ///< 私有的
    UInt32 b_default: 1;    ///< 是否有缺省值
};


#ifdef __cplusplus
}
#endif

#endif
